<template>
  <div class="importing">
    <el-form ref="form" :model="form" label-width="80px">
      <el-form-item label="上传文件" class="form-1">
        <el-upload
          class="upload-demo"
          action="http://118.190.210.28:8080"
          :on-change="handleChange"
          :file-list="form.fileList"
          :auto-upload="false"
        >
          <el-button size="small" type="primary">点击上传</el-button>
          <div slot="tip" class="el-upload__tip">
            只能上传.xls文件
          </div>
        </el-upload>
      </el-form-item>

      <el-form-item label="Excel数据">
        <el-select v-model="form.region" placeholder="请选择">
          <el-option label="sheet1" value="sheet1"></el-option>
          <el-option label="sheet2" value="sheet2"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="导入目标">
        <el-radio-group v-model="form.radio">
          <el-radio :label="3">导入到公海</el-radio>
          <el-radio :label="6">导入给业务员</el-radio>
        </el-radio-group>
        <el-select v-model="form.region" placeholder="请选择">
          <el-option label="超级管理员" value="超级管理员"></el-option>
          <el-option label="业务员1" value="业务员1"></el-option>
        </el-select>
      </el-form-item>

      <el-form-item label="去除重复数据">
        <el-checkbox v-model="form.checked1" label="客户名称" border></el-checkbox>
        <el-checkbox v-model="form.checked2" label="联系人" border></el-checkbox>
        <el-checkbox v-model="form.checked3" label="手机号码" border></el-checkbox>
      </el-form-item>

      <el-form-item label="注意事项">
        <span>1、单元格中表头字段顺序不能改变，字段不能删除;</span>
        <span>2、单元格中客户名称为必填;</span>
        <span>、、、、</span>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">开始导入</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>


<script>
export default {
  data() {
    return {
      form: {
        name: "",
        region: "",
        date1: "",
        date2: "",
        delivery: false,
        type: [],
        resource: "",
        desc: "",
        checked1:'',
        checked2:'',
        checked3:'',
        fileList:[],
      },
    };
  },
  methods: {
    onSubmit() {
      console.log("submit!");
    },
    handleChange(file, fileList) {
      //附件选择
      console.log(file, fileList);
    },
  },
};
</script>


<style lang="scss">
form {
  width: 1100px;
  margin: 40px;
}
.el-form-item {
  width: 500px;
  span{
      display: block;
  }
}
.form-1 {
  width: 1000px;
}
.el-input {
  width: 200px;
}
.receiveaddress {
  width: 500px;
}

.btn {
  margin-left: 10px;
  box-sizing: border-box;
}
</style>